function showInformSearch(){
	window.location.href="showInformSearch.do";
}

function ajaxFindInformSearchList(currentPage,pageSize) {
	$.ajax({
		type:"post",
		url: "ajaxInformSearchList.do",
		data:{
			currentPage:currentPage,
			pageSize:pageSize,
		},
		success:function(msg){
			$("#listInformBox").html(msg);
		}
	});
}

function ajaxShowInformView(id){
	$.ajax({
		type:"post",
		url:"ajaxShowInformView.do",
		data:{id:id},
		success:function(msg){
			$("#dialog").html(msg);
			$("#dialog").dialog({
				autoOpen: true,
				width: 800,
				title:$(".dialogtitle").attr("title"),
				modal: true,
				buttons : [ {
					text : "关闭",
					click : function() {
						$(this).dialog("close");
					}
				} ]
			});
		}
	});
}

function ajaxDeleteInformById(id) {
	var informIds="";
	var sltIN = $("#listInformList tbody input:checked").length;
	if(id==null){
		$("#listInformList tbody input:checked").each(function(){ 
			informIds += $(this).val()+";";
		});
		if (informIds == ""){
			showMessageDialog("提示","请选择一行或多行",null,dialogType.info);
			return;
		}else{
			informIds=informIds.substring(0, informIds.length-1);
		}
	}else{
		informIds=id;
		sltIN = 1;
	}
	if (informIds!=null) {
		showMessageDialog("删除告知信息","确定要删除所选“"+sltIN+"”条告知信息记录吗？",
				function () {
			$.ajax({					
				type:"post",
				url:"ajaxDeleteInformByIds.do",
				data:{informIds:informIds},
				success:function(msg){
					ajaxFindInformSearchList();
					showMessageDialog("提示","告知信息删除成功",null,dialogType.info);
				}
			});}
		,dialogType.warning);
	} 
}
